package com.ruoyi.table.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 
 * @TableName family
 */
@TableName(value ="family")
@Data
public class Family implements Serializable {
    /**
     * 商家、专家、用户 编号
     */
    @TableId(type = IdType.AUTO)
    private Integer familyId;

    /**
     * 账号
     */
    private String familyName;

    /**
     * 密码
     */
    private String familyPassword;

    /**
     * 银行卡
     */
    private String familyBankNumber;

    /**
     * 身份证
     */
    private String familyIdCard;

    /**
     * 营业执照
     */
    private String familyImage;

    /**
     * 角色编号
     */
    private Integer roleId;

    /**
     * 1:待审核、2:审核通过、3 :审核未通过
     */
    private Integer state;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Family other = (Family) that;
        return (this.getFamilyId() == null ? other.getFamilyId() == null : this.getFamilyId().equals(other.getFamilyId()))
            && (this.getFamilyName() == null ? other.getFamilyName() == null : this.getFamilyName().equals(other.getFamilyName()))
            && (this.getFamilyPassword() == null ? other.getFamilyPassword() == null : this.getFamilyPassword().equals(other.getFamilyPassword()))
            && (this.getFamilyBankNumber() == null ? other.getFamilyBankNumber() == null : this.getFamilyBankNumber().equals(other.getFamilyBankNumber()))
            && (this.getFamilyIdCard() == null ? other.getFamilyIdCard() == null : this.getFamilyIdCard().equals(other.getFamilyIdCard()))
            && (this.getFamilyImage() == null ? other.getFamilyImage() == null : this.getFamilyImage().equals(other.getFamilyImage()))
            && (this.getRoleId() == null ? other.getRoleId() == null : this.getRoleId().equals(other.getRoleId()))
            && (this.getState() == null ? other.getState() == null : this.getState().equals(other.getState()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getFamilyId() == null) ? 0 : getFamilyId().hashCode());
        result = prime * result + ((getFamilyName() == null) ? 0 : getFamilyName().hashCode());
        result = prime * result + ((getFamilyPassword() == null) ? 0 : getFamilyPassword().hashCode());
        result = prime * result + ((getFamilyBankNumber() == null) ? 0 : getFamilyBankNumber().hashCode());
        result = prime * result + ((getFamilyIdCard() == null) ? 0 : getFamilyIdCard().hashCode());
        result = prime * result + ((getFamilyImage() == null) ? 0 : getFamilyImage().hashCode());
        result = prime * result + ((getRoleId() == null) ? 0 : getRoleId().hashCode());
        result = prime * result + ((getState() == null) ? 0 : getState().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", familyId=").append(familyId);
        sb.append(", familyName=").append(familyName);
        sb.append(", familyPassword=").append(familyPassword);
        sb.append(", familyBankNumber=").append(familyBankNumber);
        sb.append(", familyIdCard=").append(familyIdCard);
        sb.append(", familyImage=").append(familyImage);
        sb.append(", roleId=").append(roleId);
        sb.append(", state=").append(state);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}